{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "列表\n",
    " 1. 正向取值\n",
    "# list 取值 “:”右边的值取不到 例如[0:2] 2 这个位置取不到\n",
    "print(names[0:2])\n",
    "print(names[0:2])\n",
    "# 如果 左侧的值是0 即从0开始取值，0可以省略不写\n",
    "print(names[:2])\n",
    "\n",
    "# 2. 反向取值\n",
    "# list 取值 “:”右边的值取不到 例如[-5:-3] -3 这个位置取不到\n",
    "# 取到最后一个值，不能写 0 省略不写即可\n",
    "\n",
    "\n",
    "用户输入\n",
    "username = input(\"请输入正确的账号：\")\n",
    "password = input(\"请输入正确的密码：\")\n",
    "请输入正确的账号：hy\n",
    "请输入正确的密码：230008\n",
    "基础登陆系统\n",
    "if username == user_data:\n",
    "    if password == user_password:\n",
    "        print(\"登陆成功，欢迎\",username,\"使用~\")\n",
    "    else:\n",
    "        print(\"您的账号或密码不正确\")\n",
    "else:\n",
    "    print(\"您的账号或密码不正确\")\n",
    "\n",
    "              print(\"登陆成功，欢迎\",username,\"使用~\")\n",
    "     else:\n",
    "                  print(\"您的账号或密码不正确\")\n",
    "\n",
    "\n",
    "\n",
    "   打印:（print)输出的一般方法\n",
    "\n",
    "name = input(\"name: \")\n",
    "age = input(\"age: \")\n",
    "job = input(\"job: \")\n",
    "salary = input(\"salary: \")\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}